<!doctype html>
<html class="no-js" lang="en">
<head>
<meta name="layout" content="common">
<title>Change Password</title>
</head>
<body id="body">
	<h2>Change Password</h2>
	<hr />
	<g:if test="${flash.message}">
    <div id="message" class="message">
        <g:message code="${flash.message}" />
    </div>
</g:if>
<g:if test="${message}">
    <div id="message" class="message">
        <g:message code="${message}" />
    </div>
</g:if>
<g:if test="${error}">
    <div id="errors" class="errors">
        <g:message code="${error}" />
    </div>
</g:if>
<g:hasErrors bean="${bean}">
    <div id="errors" class="errors">
        <g:renderErrors bean="${bean}"></g:renderErrors>
    </div>
</g:hasErrors>
	<div class="row>">
		<g:form method="POST" action="show">
			<table width="100%">
			  <thead>
        		<tr>
            	  <th>username: ${userInstance.username}</th>
        		</tr>
    	  	  </thead>
    		  <tbody>
				<tr>
					<td>Old Password</td>
					<td>
					<g:passwordField name="oldPassword"/>
					</td>
				</tr>
				<tr>
					<td>New Password</td>
					<td>
					<g:passwordField type="password" name="newPassword"/>
					</td>
				</tr>
				<tr>
					<td>Re-enter New Password</td>
					<td>
					<g:passwordField type="password" name="newPassword2"/>
					</td>
				</tr>
				
			  </tbody>
			</table>
			<fieldset class="buttons">
					<g:actionSubmit class="btn btn-primary" action="updatePassword" value="Submit" />
					<g:actionSubmit class="btn" action="show" value="Cancel" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
			</fieldset>
		</g:form>
	</div>
</body>
</html>
